package com.ceshiren;

import org.junit.jupiter.api.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.StringContains.containsString;

public class searchPO {
//    @Test
//    void search(){
//        MainPage main = new MainPage();
//        SearchPage search = main.search("selenium");
//        String title = search.getFirstTitle();
//        assertThat(title,containsString("selenium"));

//    }
    @Test
    void searchManul(){
        MainPage main = new MainPage();
        SearchPage search = main.start().search("selenium");
        String title = search.getFirstTitle();
        assertThat(title,containsString("selenium"));

    }
    @Test
    void  searchManul2(){
        assertThat(new MainPage().start().search("selenium").getFirstTitle(),containsString("selenium"));
    }

}
